

package com.maoshi.shop.security.comment.enums;

import com.maoshi.shop.common.exception.MaoshiShopBindException;

public enum App {

	/**
	 * 小程序
	 */
	MINI(1),

	/**
	 * 微信公众号
	 */
	MP(2),

	/**
	 * pc登陆
	 */
	PC(3),

	/**
	 * h5登陆
	 */
	H5(4),

	/**
	 * 安卓登陆
	 */
	ANDROID(5),

	/**
	 * ios登陆
	 */
	IOS(6),

	;

	private Integer num;

	public Integer value() {
		return num;
	}

	App(Integer num){
		this.num = num;
	}

	public static App instance(Integer value) {
		App[] enums = values();
		for (App statusEnum : enums) {
			if (statusEnum.value().equals(value)) {
				return statusEnum;
			}
		}
		throw new MaoshiShopBindException("无法获取app信息");
	}
}
